home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmFinger
- Caption = "Finger Sample Program"
- ClientHeight = 5565
- ClientLeft = 915
- ClientTop = 1905
- ClientWidth = 10215
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 5970
- Left = 855
- LinkTopic = "Form1"
- ScaleHeight = 5565
- ScaleWidth = 10215
- Top = 1560
- Width = 10335
- Begin VB.TextBox txtHost
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 2640
- TabIndex = 1
- Top = 480
- Width = 2175
- End
- Begin VB.CheckBox chkVerbose
- Alignment = 1 'Right Justify
- Caption = "Verbose Query"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 5520
- TabIndex = 2
- Top = 480
- Width = 1575
- End
- Begin VB.TextBox txtQueryResults
- BeginProperty Font
- name = "Courier New"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 3255
- Left = 240
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 4
- Top = 2040
- Width = 6855
- End
- Begin VB.TextBox txtQuery
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 240
- TabIndex = 0
- Top = 480
- Width = 2175
- End
- Begin VB.CommandButton cmdFingerQueryNonBlocking
- Caption = "Finger Query (Non-Blocking)"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 7440
- TabIndex = 5
- Top = 240
- Width = 2535
- End
- Begin VB.CommandButton cmdFingerQueryBlocking
- Caption = "Finger Query (Blocking)"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 7440
- TabIndex = 6
- Top = 720
- Width = 2535
- End
- Begin VB.CommandButton cmdExit
- Caption = "Exit Finger Sample"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 7440
- TabIndex = 7
- Top = 1320
- Width = 2535
- End
- Begin FingerLib.Finger Finger1
- Left = 9480
- Top = 4920
- _Version = 327680
- _ExtentX = 847
- _ExtentY = 847
- _StockProps = 64
- Blocking = -1 'True
- Query = ""
- Host = ""
- Verbose = -1 'True
- End
- Begin VB.Label Label6
- Caption = "Host:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 2640
- TabIndex = 13
- Top = 240
- Width = 1935
- End
- Begin VB.Label Label4
- Caption = "Query Error Code:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 215
- Left = 240
- TabIndex = 8
- Top = 1080
- Width = 1935
- End
- Begin VB.Label Label1
- Caption = "Finger Query:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 240
- TabIndex = 9
- Top = 240
- Width = 1935
- End
- Begin VB.Label Label2
- Caption = "Query Results:"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 240
- TabIndex = 10
- Top = 1800
- Width = 1935
- End
- Begin VB.Label lblErrorNumber
- BorderStyle = 1 'Fixed Single
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 285
- Left = 240
- TabIndex = 3
- Top = 1320
- Width = 6855
- End
- Begin VB.Label Label3
- Caption = "This sample shows how to retrieve information about a user on a specific host."
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = 7440
- TabIndex = 11
- Top = 2040
- Width = 2535
- End
- Begin VB.Label Label5
- Caption = $"fingers.frx":0000
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 1215
- Left = 7440
- TabIndex = 12
- Top = 2760
- Width = 2535
- End
- Attribute VB_Name = "frmFinger"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub cmdExit_Click()
- ' Get out.
- End
- End Sub
- Private Sub cmdFingerQueryBlocking_Click()
- Dim Index
- ' Clear results boxes.
- txtQueryResults.Text = ""
- lblErrorNumber.Caption = ""
- ' Start the query by getting the IP address
- ' of the InterNIC's Finger server. When this
- ' is complete, the rest of the query is
- ' handled by the Finger1_Done event
- ' event.
- Finger1.Blocking = True
- Finger1.Host = txtHost
- Finger1.Verbose = chkVerbose
- Finger1.Query = txtQuery.Text
- MousePointer = 11
- Finger1.Action = 1
- MousePointer = 0
- ' Place all of the results into the Query
- ' results text box.
- For Index = 0 To Finger1.ResponseCount - 1
- If Index <> 0 Then
- txtQueryResults.Text = txtQueryResults.Text & Chr(13) & Chr(10)
- End If
-
- txtQueryResults.Text = txtQueryResults.Text & Finger1.Response(Index)
- Next Index
- End Sub
- Private Sub cmdFingerQueryNonBlocking_Click()
- ' Clear results boxes.
- txtQueryResults.Text = ""
- lblErrorNumber.Caption = ""
- ' Start the query by getting the IP address
- ' of the InterNIC's Finger server. When this
- ' is complete, the rest of the query is
- ' handled by the Finger1_Done event
- ' event.
- On Error Resume Next
- Finger1.Blocking = False
- Finger1.Host = txtHost
- Finger1.Verbose = chkVerbose
- Finger1.Query = txtQuery.Text
- MousePointer = 11
- Finger1.Action = 1
- On Error GoTo 0
- End Sub
- Private Sub Finger1_Done(ErrorCode As Integer)
- Dim Index
- lblErrorNumber = "Error code: " & ErrorCode
- ' If we handled this in blocking (synchronous)
- ' mode, skip the rest (no need for it).
- If Finger1.Blocking Then
- Exit Sub
- End If
- MousePointer = 0
- ' Place all of the results into the Query
- ' results text box.
- For Index = 0 To Finger1.ResponseCount - 1
- If Index <> 0 Then
- txtQueryResults.Text = txtQueryResults.Text & Chr(13) & Chr(10)
- End If
-
- txtQueryResults.Text = txtQueryResults.Text & Finger1.Response(Index)
- Next Index
- End Sub
-